#ifndef	__HPTimer_h__
#define	__HPTimer_h__

#include <Windows.h>

class HPTimer
{
public:
	void Start(void)
	{
		::QueryPerformanceCounter(&m_TimeStart);
	}
	void Stop(void)
	{
		::QueryPerformanceCounter(&m_TimeStop);
	}
	double GetTimeInSeconds(void) const
	{
		LARGE_INTEGER freq;
		::QueryPerformanceFrequency(&freq);
		double duration = static_cast<double>(m_TimeStop.QuadPart - m_TimeStart.QuadPart) / static_cast<double>(freq.QuadPart);
		return duration;
	}

private:
	LARGE_INTEGER	m_TimeStart;
	LARGE_INTEGER	m_TimeStop;
};

#endif	// __HPTimer_h__
